package com.xcity.game.battle.pve.employee.impl;

import com.xcity.game.battle.pve.PlayerBattler;
import com.xcity.game.battle.pve.employee.EmployeeSkillBattleContext;
import com.xcity.game.common.GameStaticConfig;
import com.xcity.game.employee.skill.EmployeeSkill;

//{2=90091#0}{3=90092#0}共同出场时，在谈判中有{0=35#0}%几率回复玩家{1=100#0}%气势值
public class SKILL_37_CONTEXT extends EmployeeSkillBattleContext {

	public SKILL_37_CONTEXT(PlayerBattler player, EmployeeSkill ref) {
		super(player, ref);
	}

	@Override
	public boolean trigger() {
		int n = rnd.nextInt(GameStaticConfig.percentBase);
		if (n < ref.getTemplate().getInitVal(0)) {
			player.setHp((int) (player.getHp() + player.getMaxHp() * ref.getTemplate().getInitVal(1) / 100));
		}
		return false;
	}

}
